// 全局layout
// 所有的页面去添加相同的html

// 更多的用来做重定向

import { IRouteComponentProps, Redirect } from 'umi';

const Layout = ({
  children,
  location,
  route,
  history,
  match,
}: IRouteComponentProps) => {
  // console.log(location);

  if (location.pathname === '/') {
    return <Redirect to="/home"></Redirect>;
  } else {
    return children;
  }
};

export default Layout;
